﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class TFDisposable
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class TFDisposable
   ">
    <meta name="generator" content="docfx 2.18.2.0">
    
    <link rel="shortcut icon" href="../../favicon.ico">
    <link rel="stylesheet" href="../../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../../styles/docfx.css">
    <link rel="stylesheet" href="../../styles/main.css">
    <meta property="docfx:navrel" content="../../toc.html">
    <meta property="docfx:tocrel" content="../toc.html">
    
    
  </head>
  <body data-spy="scroll" data-target="#affix">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="../../index.html">
                <img id="logo" class="svg" src="../../logo.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div role="main" class="container body-content hide-when-search">
        
        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="TensorFlow.TFDisposable">
  
  
  <h1 id="TensorFlow_TFDisposable" data-uid="TensorFlow.TFDisposable">Class TFDisposable
  </h1>
  <div class="markdown level0 summary"><p>Base class for many TensorFlow data types that provides a common idiom to dispose and
            release resources associated with the native data types.   Generally, you do not need to use this.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><span class="xref">System.Object</span></div>
    <div class="level1"><span class="xref">TFDisposable</span></div>
  </div>
      <div class="level2"><a class="xref" href="TensorFlow.TFBuffer.html">TFBuffer</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFFunction.html">TFFunction</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFGraph.html">TFGraph</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFImportGraphDefOptions.html">TFImportGraphDefOptions</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFLibrary.html">TFLibrary</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFOperationDesc.html">TFOperationDesc</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFSession.html">TFSession</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFSessionOptions.html">TFSessionOptions</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFStatus.html">TFStatus</a></div>
      <div class="level2"><a class="xref" href="TensorFlow.TFTensor.html">TFTensor</a></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="../TensorFlow.html">TensorFlow</a></h6>
  <h6><strong>Assembly</strong>: TensorFlowSharp.dll</h6>
  <h5 id="TensorFlow_TFDisposable_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class TFDisposable : IDisposable</code></pre>
  </div>
  <h5 id="TensorFlow_TFDisposable_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>
            This implements the Dispose pattern in a reusable form for TensorFlow types.
            </p>
    <p>
            Subclasses invoke the constructor with the handle that this will wrap, and must
            override the NativeDispose method (internal) to release the associated resource.
            </p></div>
  <h3 id="constructors">Constructors
  </h3>
  
  
  <a id="TensorFlow_TFDisposable__ctor_" data-uid="TensorFlow.TFDisposable.#ctor*"></a>
  <h4 id="TensorFlow_TFDisposable__ctor" data-uid="TensorFlow.TFDisposable.#ctor">TFDisposable()</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a> class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public TFDisposable ();</code></pre>
  </div>
  
  
  <a id="TensorFlow_TFDisposable__ctor_" data-uid="TensorFlow.TFDisposable.#ctor*"></a>
  <h4 id="TensorFlow_TFDisposable__ctor_System_IntPtr_" data-uid="TensorFlow.TFDisposable.#ctor(System.IntPtr)">TFDisposable(IntPtr)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a> class
            from the handle that it will wrap.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public TFDisposable (IntPtr handle);</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.IntPtr</span></td>
        <td><span class="parametername">handle</span></td>
        <td><p>To be added.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
  </h3>
  
  
  <a id="TensorFlow_TFDisposable_Handle_" data-uid="TensorFlow.TFDisposable.Handle*"></a>
  <h4 id="TensorFlow_TFDisposable_Handle" data-uid="TensorFlow.TFDisposable.Handle">Handle</h4>
  <div class="markdown level1 summary"><p>Returns the opaque handle to the object that this TFDisposable owns.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IntPtr Handle { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.IntPtr</span></td>
        <td><p>The handle.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
  </h3>
  
  
  <a id="TensorFlow_TFDisposable_Dispose_" data-uid="TensorFlow.TFDisposable.Dispose*"></a>
  <h4 id="TensorFlow_TFDisposable_Dispose" data-uid="TensorFlow.TFDisposable.Dispose">Dispose()</h4>
  <div class="markdown level1 summary"><p>Releases all resource used by the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a> object.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Dispose ();</code></pre>
  </div>
  <h5 id="TensorFlow_TFDisposable_Dispose_remarks">Remarks</h5>
  <div class="markdown level1 remarks"><p>Call Dispose when you are finished using the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a>. The
            Dispose method leaves the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a> in an unusable state. After
            calling Dispose, you must release all references to the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a> so
            the garbage collector can reclaim the memory that the <a class="xref" href="TensorFlow.TFDisposable.html">TFDisposable</a> was occupying.</p>
</div>
  
  
  <a id="TensorFlow_TFDisposable_Dispose_" data-uid="TensorFlow.TFDisposable.Dispose*"></a>
  <h4 id="TensorFlow_TFDisposable_Dispose_System_Boolean_" data-uid="TensorFlow.TFDisposable.Dispose(System.Boolean)">Dispose(Boolean)</h4>
  <div class="markdown level1 summary"><p>Dispose the specified object</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual void Dispose (bool disposing);</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><span class="parametername">disposing</span></td>
        <td><p>If set to <code>true</code> it means that this method was called from Dispose, otherwise from the finalizer.</p>
</td>
      </tr>
    </tbody>
  </table>
  
  
  <a id="TensorFlow_TFDisposable_Finalize_" data-uid="TensorFlow.TFDisposable.Finalize*"></a>
  <h4 id="TensorFlow_TFDisposable_Finalize" data-uid="TensorFlow.TFDisposable.Finalize">Finalize()</h4>
  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">~TFDisposable ();</code></pre>
  </div>
</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <div class="contribution">
                <ul class="nav">
                </ul>
              </div>
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
              <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            
            <span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="../../styles/docfx.js"></script>
    <script type="text/javascript" src="../../styles/main.js"></script>
  </body>
</html>
